package com.bidevalution.business.enums;

/**
 * 表决类型
 */
public enum VoteAlgorithmEnum {
    YiPiaoFouJue(1,"一票否決"),
    ShaoShuFuCongDuoShu(0,"少數服從多數");

    public int code;
    public String name;

    VoteAlgorithmEnum(int code, String name){
        this.code = code;
        this.name = name;
    }

    public static VoteAlgorithmEnum getVoteTypeEnum(int code) {
        for(VoteAlgorithmEnum item : VoteAlgorithmEnum.values()) {
            if (item.code == code) {
                return item;
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
}
